<html lang="zh-CN"><head>
    <title>订单详情</title>
    <meta charset="UTF-8">
    <meta name="viewport" content=" initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <!-- <script src="http://sdk.talkingdata.com/app/h5/v1?appid=DE13C350F41F5DE78FEC51DB5DE730D1&vn=v2&vc=v2"></script> -->
    <script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/zepto.1.1.3.min.js{$Think.config.RESOURCE_VER}"></script>
    <script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/zepto.alert.js{$Think.config.RESOURCE_VER}"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script src="{$Think.config.RESOURCEURL}wx_assets/js/util.js{$Think.config.RESOURCE_VER}" type="text/javascript"></script>
    <script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/product/product.js{$Think.config.RESOURCE_VER}"></script>
    <link rel="stylesheet" href="{$Think.config.RESOURCEURL}wx_assets/css/iconfont/font_tuan.css{$Think.config.RESOURCE_VER}" onerror="_cdnFallback(this)">
    <link rel="stylesheet" href="{$Think.config.RESOURCEURL}wx_assets/css/common.css{$Think.config.RESOURCE_VER}" onerror="_cdnFallback(this)">
    <if condition="$mallHue.mallHue eq '1'">
        <link rel="stylesheet" href="{$Think.config.RESOURCEURL}wx_assets/css/product/ordercommit1_blue.css{$Think.config.RESOURCE_VER}" onerror="_cdnFallback(this)">
        <else/>
        <link rel="stylesheet" href="{$Think.config.RESOURCEURL}wx_assets/css/product/ordercommit1.css{$Think.config.RESOURCE_VER}" onerror="_cdnFallback(this)">
    </if>
    <link rel="stylesheet" href="{$Think.config.RESOURCEURL}wx_assets/css/product/ordercommit2.css{$Think.config.RESOURCE_VER}" onerror="_cdnFallback(this)">
</head>
<body class=" " style="padding-bottom:0;font-size:14px;font-family: initial;font-family: '微软雅黑' !important;">
<div class="container js-page-content wap-page-order lay_page">
    <div class="content confirm-container" style="height: auto">
        <div class="app app-order" style='padding-bottom: 40px;'>
            <div class="app-inner inner-order" id="js-page-content">
                <div class="js-logistics-content logistics-content js-express" style="">
                    <div class="block status_block">
                        <span>
	                	<if condition="$status eq 'ok'">您的订单已经交易成功
                            <elseif condition="$status eq 'closed'"/>这个订单已经取消了，请不要留恋，因为更多精彩等着你！
                            <elseif condition="$status eq 'paying'"/>你若支付，我便不离不弃！
                            <elseif condition="$status eq 'delivering'"/>您的订单正在等待发货
                            <elseif condition="$status eq 'deliveringtostore'"/>我即将出发，咱们到约定的地点见面哦。
                            <elseif condition="$status eq 'delivered'"/>您的订单已经发货
                            <elseif condition="$status eq 'deliveredtostore'"/>你在哪呢？我已经到约定的地点啦，过来把我接回家吧。
                            <elseif condition="$status eq 'notsubmit'" />你还记得吗？你把我遗忘在您的购物车了，我好寂寞！
                            <elseif condition="$status eq 'refund'"/>您的订单已经退款成功
                            <elseif condition="$status eq 'refundedpart'"/>您支付的部分商品款，已经原路退还给您，请注意查收哦。
                            <elseif condition="$status eq 'refunding'"/>正在给您办理退款中
                            <elseif condition="$status eq 'payingconfirm'"/>[付款确认中]
                            <elseif condition="$status eq 'paypart'"/>您已经支付了部分款项，请按活动规则完成任务，然后我就是您的啦！
                            <elseif condition="$status eq 'partake'"/>您已经成功参与夺宝，静静的等待系统为您揭晓吧，祝你好运呦！
                            <elseif condition="$status eq 'teaming'"/>组团尚未成功，邀请好友一起参团，享优惠！
                            <elseif condition="$status eq 'ordersign'"/>您已经报名成功啦！请耐心等待审核哦。
                            <elseif condition="$status eq 'confirmsign'"/>您的报名已经确认！相遇原是注定，活动因你精彩。
                            <elseif condition="$status eq 'canclesign'"/>报名已经取消了。迫切期望下次与你相遇。
                            <elseif condition="$status eq 'supported'"/>宝贝还在众筹中，请耐心等待，为了梦想，我会继续努力！
                            <else />[状态错误]
                        </if>
                            </span>
                        <if condition="$status eq 'ok' or $status eq 'delivering' or $status eq 'delivered' or $status eq 'refunding' or $status eq 'refund'">
                            <img style="padding:10px;box-sizing:border-box" src="{$Think.config.RESOURCEURL}wx_assets/images/product/od_stu_{$status}.png{$Think.config.RESOURCE_VER}" alt="" />
                            <else/>
                            <img src="{$Think.config.RESOURCEURL}wx_assets/images/product/od_stu_{$status}.png{$Think.config.RESOURCE_VER}" alt="" />
                        </if>

                    </div>
                    <php>if($logisticsStatue != '1'){</php>
                        <div class="block block-form block-border-top-none block-border-bottom-none">
                            <i class="iconfont tagaddr">&#xe602;</i>
                            <div class="js-order-address express-panel" id="address"  style="font-size:14px;padding-left:0;padding-right:10px">
                                <if condition="$deliveryType eq 'pickup'">
                                    <ul>
                                        <li id="addr_fullName">收货人：{$fullName} <span style="float: right;">{$phone}</span></li>
                                    </ul>
                                    <div class="store_name" id="store_name">自提点名称：{$storeInfo.name}</div>
                                    <div class="store_phone" id="store_phone">自提点电话：{$storeInfo.phone}</div>
                                    <div class="store_address" id="store_address">自提点地址：{$storeInfo.address}</div>
                                    <notempty name="pickupCode">
                                        <div class="pickup-code" style="color: #F75493;">提货码：{$pickupCode}</div>
                                    </notempty>
                                    <else/>
                                    <ul>
                                        <if condition="$isActivity neq '1'">
                                            <li id="addr_fullName">收货人：{$fullName} <span style="float: right;">{$phone}</span></li>
                                            <li id="addr_detail">收货地址：{$province}{$city}{$country}{$address} </li>
                                            <else/>
                                            <li id="addr_fullName">联系人：{$fullName} <span style="float: right;">手机号码：{$phone}</span></li>
                                        </if>
                                    </ul>
                                </if>
                                <!--<li>辉煌国际</li>-->
                            </div>
                        </div>
                    <php>}</php>
                    <div class="js-logistics-tips logistics-tips font-size-12 c-orange hide">很抱歉，该地区暂不支持配送。</div>
                </div>
                <div class="block block-order ">

                    <div class="block block-list block-border-top-none block-border-bottom-none">
                        <volist name="productList" id="order">
                            <div class="bottom" style=''>
                                订单编号：{$serialNumber}
                            	<span class="pinkFont" style="float: right;">
                            	<notempty name="status">
                                    <if condition="$status eq 'ok'">交易成功
                                        <elseif condition="$status eq 'closed'"/>交易关闭
                                        <elseif condition="$status eq 'paying'"/>等待付款
                                        <elseif condition="$status eq 'delivering'"/>等待发货
                                        <elseif condition="$status eq 'deliveringtostore'"/>等待配送到自提点
                                        <elseif condition="$status eq 'delivered'"/>已发货
                                        <elseif condition="$status eq 'deliveredtostore'"/>已配送到自提点
                                        <elseif condition="$status eq 'notsubmit'" />未提交
                                        <elseif condition="$status eq 'refund'"/>已退款
                                        <elseif condition="$status eq 'refundedpart'"/>已部分退款
                                        <elseif condition="$status eq 'refunding'"/>退款中
                                        <elseif condition="$status eq 'payingconfirm'"/>付款确认中
                                        <elseif condition="$status eq 'paypart'"/>部分付款
                                        <elseif condition="$status eq 'partake'"/>已参与夺宝
                                        <elseif condition="$status eq 'teaming'"/>组团中
                                        <elseif condition="$status eq 'ordersign'"/>已报名
                                        <elseif condition="$status eq 'confirmsign'"/>已确认报名
                                        <elseif condition="$status eq 'canclesign'"/>已取消报名
                                        <elseif condition="$status eq 'supported'"/>众筹中
                                        <else />[状态错误]
                                    </if>
                                </notempty>
		                        </span>
                            </div>
                            <volist name="order.list" id="product">
                                <div class="block-item name-card name-card-3col clearfix" style="padding: 8px 10px;background: #f5f5f5;">
                                    <a style="background: white;" onClick="onDetail('{$order.orderInfo.fromCustomerId}','{$product.id}','{$qId}','{$miUid}')" class="thumb">
                                        <if condition="$product['picUrl1'][1]">
                                            <img class="js-view-image" src='<php>echo $product["picUrl1"][1]["picUrl"];</php>@60w_60h_100Q' alt="{$product.name}"/>
                                            <else/>
                                            <img class="js-view-image" src='{$product.picUrl}@60w_60h_100Q' alt="{$product.name}"/>
                                        </if>
                                    </a>
                                    <div class="detail">
                                        <a onClick="onDetail('{$fromCustomerId}','{$product.id}','{$qId}','{$miUid}')"><h3>{$product.name}</h3></a>
                                        <p class="c-gray ellipsis">
                                            <notempty name="product.sizeName">
                                                规格:{$product.sizeName}&nbsp;
                                            </notempty>
                                            <notempty name="product.colorName">{$product.colorName}&nbsp;</notempty>
                                            <notempty name="product.customizedInfo">
                                                <volist name="product.customizedInfo" id="customized">
                                                    <br/>{$customized.name}:{$customized.description}&nbsp;
                                                </volist>
                                            </notempty>
                                            <notempty name="product.customizedName1">
                                                <br/>{$product.customizedName1}:
                                            </notempty>
                                            <notempty name="product.customizedDescription1">{$product.customizedDescription1}&nbsp;</notempty>
                                            <notempty name="product.customizedName2">
                                                <br/>{$product.customizedName2}:
                                            </notempty>
                                            <notempty name="product.customizedDescription2">{$product.customizedDescription2}&nbsp;</notempty>
                                            <notempty name="product.customizedName3">
                                                <br/>{$product.customizedName3}:
                                            </notempty>
                                            <notempty name="product.customizedDescription3">{$product.customizedDescription3}&nbsp;</notempty>
                                        </p>
                                    </div>
                                    <div class="right-col">
                                        <div class="price pinkFont">
                                          <if condition="$type eq 'point'">
                                            {$product['points']}积分
                                            <else />￥{$product['price']}
                                          </if>
                                        </div>
                                        <div class="num">×<span class="num-txt">{$product.reserveCount}</span></div>
                                        <if condition="$status eq 'ok'">
                                            <div>
                                                <if condition="$product.isComment eq '1'">
                                                    <a class="btn btn-in-order-list pinkBack" style="float: right;color: white;padding: 2px 5px;border-radius: 0;border: none;width: auto; font-size: 12px;">已晒单</a>
                                                    <elseif condition="$product.isComment eq '0'"/>
                                                    <a class="btn btn-orange btn-in-order-list pinkBack" onclick="toComment('{$id}','{$product.id}')" style="float: right;color: white;padding: 2px 5px;border-radius: 0;border: none;width: auto; font-size: 12px;">
                                                        晒单有红包
                                                    </a>
                                                </if>
                                            </div>
                                        </if>
                                    </div>
                                </div>
                            </volist>
                        </volist>
                        <div class="bottom">共{$product.reserveCount}件商品
	                        <span class=" pull-right" style="color: #777;">
	                              <if condition="$deliveryType eq 'delivery' and $logisticsCost neq null AND $logisticsCost neq ''">
                                      合计：<span class="pinkFont">￥<php>echo sprintf("%.2f",$price);</php></span>（运费￥ <php>echo sprintf("%.2f",$logisticsCost);</php>）
                                      <elseif condition="$type eq 'point'" />合计：<span class="pinkFont">{$points}积分</span>（免运费￥0）
                                      <else/>
                                      合计：<span class="pinkFont">￥<php>echo sprintf("%.2f",$price);</php></span>（免运费￥0）
                                  </if>
	                   		</span>
                        </div>
                    </div>
                </div>
                <if condition="$userCouponId neq '' and $userCouponId gt 0">
                    <div class="block block-order">
                        <div class="order-message">
                            优惠券
                            <span class=" pull-right pinkFont" style="float:right">-￥{$money}</span>
                        </div>
                    </div>
                </if>
                <if condition="$purseMoney gt 0">
                    <div class="block block-order">
                        <div class="order-message">
                            使用钱包
                            <span class=" pull-right pinkFont" style="float:right">-￥{$purseMoney}</span>
                        </div>
                    </div>
                </if>
                <div class="block block-order ">
                    <div class="order-message">
                        <span class="font-size-14">买家说明：</span><p class="message-content font-size-12">
                        <notempty name="remark">{$remark}</notempty>
                        <empty name="remark">无</empty>
                    </p>
                    </div>
                </div>
                <div class="block block-order ">
                    <div class="order-message">
                        <span class="font-size-14 pinkFont">卖家说明：</span><p class="message-content font-size-12">
                        <notempty name="sellerRemark">{$sellerRemark}</notempty>
                        <empty name="sellerRemark">无</empty>
                    </p>
                    </div>
                </div>
                <div class="block block-order ">
                    <div class="order-message">
                        <span class="font-size-14" >支付方式：</span>
                        <p class="message-content font-size-12">
                              <if condition="$type eq 'point'">积分支付
                                <elseif condition="$payType eq 'wxpay'"/>微信支付
                                <elseif condition="$payType eq 'alipay'"/>支付宝
                                <elseif condition="$payType eq 'ainongpay'"/>银行卡支付
                                <else/>无
                              </if>
                            </notempty>
                        </p>
                    </div>
                    <div class="order-message">
                        <span class="font-size-14" >下单时间：</span>
                        <p class="message-content font-size-12">
                            <notempty name="createTime">{$createTime}</notempty>
                            <empty name="createTime">无</empty>
                        </p>
                    </div>
                    <if condition="$deliveryType eq 'delivery'">
                        <div class="order-message">
                            <span class="font-size-14" >快递单号：</span>
                            <p class="message-content font-size-12">
                                <notempty name="expressNo">{$expressNo}</notempty>
                                <empty name="expressNo">无</empty>
                            </p>
                        </div>
                        <div class="order-message">
                            <span class="font-size-14" >快递方式：</span>
                            <p class="message-content font-size-12">
                                <notempty name="expressName">{$expressName1}</notempty>
                                <empty name="expressName">无</empty>
                            </p>
                        </div>
                    </if>
                </div>
            </div>

            <if condition="$isVirtual eq '1' AND $status neq 'refund'">
                <div class="js-logistics-content logistics-content js-express" style="  border-top: 1px solid #e5e5e5;  border-bottom: 1px solid #e5e5e5;margin-top:10px">
                    <div class="block block-form block-border-top-none block-border-bottom-none" style="padding:0 10px">
                        <div class="js-order-address express-panel"  style="padding:0">
                            <div class="yzm-title">
                                <span>验证码</span>
                                <span class="time">有效期至：<php>print_r(date("Y-m-d",strtotime($productList[$id][0]['virtualEndTime'])));</php></span>
                            </div>
                            <div class="yzm-common">
                                <ul>
                                    <volist name="verifyCode" id="bar">
                                        <li>{$bar['code']}
                                            <if condition="$bar['isClaim'] eq '1'"><span>（已使用）</span></if>
                                            <if condition="$bar['disabled'] eq '0'"><span style="color:red">(不可用)</span></if>
                                        </li>
                                    </volist>
                                </ul>
                            </div>
                            <div class="yzm-ruler">
                                <dl>
                                    <dt>使用规则</dt>
                                    <dd><PHP>print_r($productList[$id][0]['virtualInfo']);</PHP></dd>
                                </dl>
                            </div>
                        </div>
                    </div>
                </div>
            </if>
        </div>
        <div class="js-logistics-content logistics-content js-self-fetch hide"></div>

        <!-- 支付 -->
        <div class="js-step-topay">
            <!-- 如果不是赠品，则走正常逻辑 -->
            <div class="js-used-coupon block" style='display:none'><div class="block-item order-coupon relative">
                <h4 class="block-item-title">优惠</h4>
                <div class="coupon-info-container">
                    <div class="js-normal-coupon coupon-info">
                        <span class="">使用优惠</span>
                    </div>
                    <span class="arrow"></span>
                </div>

            </div>
            </div>
            <if condition="$status eq 'delivered' OR ($type neq 'point' AND $status eq 'delivering') OR $status eq 'deliveringtostore' OR $status eq 'deliveredtostore' OR $status eq 'payingconfirm' OR $status eq 'paypart' OR $status eq 'delivered' OR $status eq 'ordersign'">
                <div class="action-container" id="confirm-pay-way-opts">
                    <if condition="$type neq 'point' AND ($status eq 'delivered' OR $status eq 'deliveringtostore' OR $status eq 'deliveredtostore' OR $status eq 'delivering' OR $status eq 'payingconfirm' OR $status eq 'paypart' OR ($status eq 'ordersign' AND $price gt 0))">
                        <button type="button" onclick="getRefund(this,{$id})" class="btn-pay btn btn-block btn-large btn-umpay" style="display: inline-block !important;background: white;border:1px solid #999;color:#686868;">退款</button>
                    </if>
                    <if condition="$status eq 'delivered'">
                        <a type="button" href='javascript:logistics();' class="btn-pay btn btn-block btn-large btn-umpay " style="background: white;border:1px solid #999;color:#686868">查物流</a>
                        <a type="button" href="javascript:receipt();" class="btn-comfirm btn-pay btn btn-block btn-large btn-umpay pinkBack" style="border-radius: 2px !important;color:white; ">确认收货</a>

                    </if>


                </div>
            </if>
            <div class="center action-tip js-pay-tip" style="display:none"></div>

        </div>
    </div>
</div>
</div>
<div class="qb_quick_tip qb_none" id="bubble"></div>
<div class="mod_dialog qb_none" id="message-notice">
    <div class="dialog_mask"></div>
    <div class="dialog_main qb_br qb_tac">
        <div class="dialog_bd" id="notice-content"></div>
        <div class="dialog_ft qb_flex"><a href="javascript:void(0);" class="flex_box" id="notice-cancel">取消</a><a href="javascript:void(0);" class="flex_box" id="notice-sure">确定</a></div>
    </div>
</div>
<div id="js-self-fetch-modal" class="modal order-modal"></div>
<div class="footer" style="display:none">
    <!-- 商家公众微信号 -->
    <div class="copyright">
        <div class="ft-copyright">
            <a href="" target="_blank">由&nbsp;<span class="company">摩宝时代</span>&nbsp;免费技术支持</a>
        </div>
    </div>
</div>
<script>
    var hrefParamsArray = GetSessionIdFromHref(window.location.search);
    hrefParamsArray["userName"]='{$userName}';
    function GetSessionIdFromHref(search){
    　　	var args = search.substring(1);
　　	var retval = new Array();
        args = args.split("&");
        for(var i = 0; i < args.length; i ++){
            str = args[i];
            var arg = str.split("=");
            if(arg.length <= 1) continue;

            if(arg[0] == 'params') {
                var params = decodeURIComponent(arg[1]);
                var obj = eval('(' + params + ')');
                if (obj.rootid != undefined) {
                    retval["rootid"] = obj.rootid;
                }
            } else if(arg[0] == 'customerId') {
                retval["customerId"] = arg[1];
            }else if(arg[0] == 'userName'){
                retval["userName"] = arg[1];
            }
        }
        return retval;
    }

    var hrefPath = 'call.html?customerId='+ hrefParamsArray["customerId"];
    var basePath = 'call.json?customerId='+ hrefParamsArray["customerId"]+'&userName='+hrefParamsArray["userName"];
    var rootId = hrefParamsArray["rootid"] == undefined ? '' : ',"rootid":' + hrefParamsArray["rootid"];
</script>
<script>
    function toComment(oid,pid){
        var params={
            "oid":oid,
            "pid":pid
        }
        params=encodeURIComponent(JSON.stringify(params));
        location.href= 'call.html?customerId={$customerId}&module=product&method=getcomment&params='+params;
    }
    function logistics(){
        var expressName = '{$expressName}';
        var expressNo = '{$expressNo}';
        var oid = '{$id}';
        var params={
            "Express":expressName,
            "orderNum":expressNo,
            "oid":oid
        }
        params=encodeURIComponent(JSON.stringify(params));
        location.href='call.html?customerId={$customerId}&module=product&method=productExpress&params='+params;
    }
    function onDetail(fromCustomerId,id,qId,miUid) {
        var params={
            "id":id,
            "qId":qId,
            "miUId":miUid
        }
        params=encodeURIComponent(JSON.stringify(params));
        location.href= 'call.html?customerId='+fromCustomerId+'&module=product&method=getProduct&params='+params;
    }
    function receipt(){
        var p=$.util.getParamAsObject();
        $.util.ok("确定已经收到货物了吗？",function(){
            var oid = '{$id}';
            var urlString = 'call.json?customerId='+ hrefParamsArray["customerId"]+'&userName='+hrefParamsArray["userName"];
            $.ajax({
                url: urlString,
                dataType: "json",
                type: "POST",
                data: {
                    module: 'product',
                    method: 'setOrderStatus',
                    params: '{"oid":' + parseInt(oid) + ',"status":"ok"}'
                },
                success:function(b){
                    if(!p){p={};}
                    var myDate = new Date();
                    var time = myDate.getSeconds()+""+myDate.getMilliseconds();
                    p.v=time;
                    p=encodeURIComponent(JSON.stringify(p));
                    location.href = '{$Think.config.SERVER_HOST}call.html?customerId={$customerId}&module=product&method=getOrderDetail&force=1&params='+p;
                },
                error:function(){
                    if(!p){p={};}
                    var myDate = new Date();
                    var time = myDate.getSeconds()+""+myDate.getMilliseconds();
                    p.v=time;
                    p=encodeURIComponent(JSON.stringify(p));
                    location.href = '{$Think.config.SERVER_HOST}call.html?customerId={$customerId}&module=product&method=getOrderDetail&force=1&params='+p;
                }
            });
        });
    }
    function getRefund(ctrl,id) {
        $.util.ok("如果您对我们的产品不满意，我们即刻为您办理退款，妥妥的！",function(){
            var urlString = 'call.json?customerId='+ hrefParamsArray["customerId"]+'&userName='+hrefParamsArray["userName"];
            $.ajax({
                url: urlString,
                dataType: "json",
                type: "POST",
                data: {
                    module: 'product',
                    method: 'productOrderRefund',
                    params: '{"id":"' + id + '"}'
                },
                success:function(b){
                    if (b.code == 0) {
                        location.reload();
                    } else {
                        $.util.alert(b.msg);
                    }
                }
            });
        });
    }

</script>
</body></html>